package com.blyat.xsoft.kernel.component.disruptor;


/**
 * @Auther: syh
 * @Date: 2020/7/27
 * @Description:
 */
public abstract class MetadataHandler<T> implements Handler<T> {
    @Override
    public void onEvent(Metadata<T> metadata, long sequence, boolean endOfBatch) throws Exception {
        handle(metadata.get(), endOfBatch);
    }

    @Override
    public void onEvent(Metadata<T> metadata) throws Exception {
        handle(metadata.get(), null);
    }
}
